package lib {
	import mx.core.mx_internal;

	use namespace mx_internal;

	import mx.controls.TextArea;
	import mx.logging.targets.LineFormattedTarget;

	public class TextAreaTarget extends LineFormattedTarget {
		private var textArea: TextArea;
		
	    public function TextAreaTarget(value: TextArea) {
	    	textArea = value;
	    }
	
		override mx_internal function internalLog(message:String):void {
			if (textArea) {
				textArea.text += message + "\n";
			}
	    }
	}
}
